<%@ page language="java" import="java.util.*" pageEncoding="UTF-8"%>
<%@ taglib prefix="display" uri="http://displaytag.sf.net"%>
<%@taglib prefix="s" uri="/struts-tags"%>
<%@taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core"%>
<%@page import="java.util.*"%>

<%@ page import="br.com.knowledge.persistence.hibernate.entities.CadProjeto" %>
<%@ page import="br.com.knowledge.persistence.hibernate.dao.CadProjetoDAO" %>

<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
	<head>
		<title>Listar Projetos</title>
	</head>
		<script type="text/javascript">
		$(document).ready(function(){
			$(".LinkDel").click(function(){
				if(!confirm("Deseja Deletar o Projeto?")){
					$("#loading").hide();
					$(".loadingImage").CenterIt();
					$(".loadingImage").hide();
					return false;
				}
			});
		});	
		</script>	
		<body>
			<h1>
				<a href="chama-cadprojeto">Cadastrar Projeto</a>
			</h1>
			<br>
			<display:table list="${projetos}" uid="projetos" sort="list"style="width:35%;">
				<display:column property="nmprojeto" title="Projeto"></display:column>
				<display:column property="descricao" title="Descrição"></display:column>
				<display:column title="" href="toChangeProjeto" paramId="projToChange.id" paramProperty="id" style="width:5%;">Alterar</display:column>				
				<display:column title="" href="deletar-projeto" paramId="projToChange.id" class = "LinkDel" paramProperty="id" style="width:5%;">Deletar</display:column>
			</display:table>
	</body>
</html>